<!DOCTYPE html>
<html lang="en">
<head>
    <script src="/static/js/dev.js"></script>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/element-ui/element-ui.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <link href="/static/css/common-element-plus.css" rel="stylesheet"/>
    <link href="/static/css/common_biz.css" rel="stylesheet"/>
<#list model.extInfo.cssLinkList as css>
    <#if css.url?? && (css.url?length>0)>
    <link href="${css.url}" rel="stylesheet"/>
    </#if>
</#list>

    <title>${model.name!}</title>
    <style>
    <#if model.globalCss??>
        ${model.globalCss}
    </#if>
    </style>
</head>
<body class="skin-default">
<div id="app" class="element-app-box">

    <!-- 查询条件 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
                <el-form :inline="true" :model="searchCondition">
            <#if conditionFields?? && (conditionFields?size > 0)>
                <#list conditionFields as field>
                    <el-form-item label="${field.listHeaderTitle!}" <#if (field_index > 2)>v-if="moreConditionFlag"</#if> >
                    <#if field.formControlType == 'date'>
                        <el-date-picker v-model="searchCondition.${field.fieldJavaName}" type="date" ></el-date-picker>
                    <#elseif field.formControlType == 'time'>
                        <el-date-picker v-model="searchCondition.${field.fieldJavaName}" type="datetime" ></el-date-picker>
                    <#elseif field.formControlType == 'switch'>
                        <#if field.fieldJavaType == 'String'>
                            <el-switch v-model="searchCondition.${field.fieldJavaName}"
                                       <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>active-value="${field.formControlConfig.yesValue}"<#else>active-value="1"</#if>
                                    <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>inactive-value="${field.formControlConfig.noValue}"<#else>inactive-value="0"</#if>
                            ></el-switch>
                        <#elseif field.fieldJavaType == 'Boolean'>
                            <el-switch v-model="searchCondition.${field.fieldJavaName}"
                                       <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>:active-value="${field.formControlConfig.yesValue}"<#else>:active-value="true"</#if>
                                    <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>:inactive-value="${field.formControlConfig.noValue}"<#else>:inactive-value="false"</#if>
                            ></el-switch>
                        <#else>
                            <el-switch v-model="searchCondition.${field.fieldJavaName}"
                                       <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>:active-value="${field.formControlConfig.yesValue}"<#else>:active-value="1"</#if>
                                    <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>:inactive-value="${field.formControlConfig.noValue}"<#else>:inactive-value="0"</#if>
                            ></el-switch>
                        </#if>
                    <#elseif field.formControlType == 'select'>
                        <el-select v-model="searchCondition.${field.fieldJavaName}">
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-option v-for="option in ${field.fieldJavaName}Options" :value="option.${field.formControlDataSource.keyField!}" :label="option.${field.formControlDataSource.valueField!}"></el-option>
                        <#else >
                            <el-option value="" label="Option A"></el-option>
                        </#if>
                        </el-select>
                    <#elseif field.formControlType == 'radio'>
                        <el-radio-group v-model="searchCondition.${field.fieldJavaName}">
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-radio v-for="option in ${field.fieldJavaName}Options" :label="option.${field.formControlDataSource.keyField!}">{{option.${field.formControlDataSource.valueField!}}}</el-radio>
                        <#else>
                            <el-radio label="1">Option A</el-radio>
                        </#if>
                        </el-radio-group>
                    <#elseif field.formControlType == 'checkbox'>
                        <el-checkbox-group v-model="searchCondition.${field.fieldJavaName}">
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-checkbox v-for="option in ${field.fieldJavaName}Options" :label="option.${field.formControlDataSource.keyField!}">{{option.${field.formControlDataSource.valueField!}}}</el-checkbox>
                        <#else>
                            <el-checkbox label="1">Option A</el-checkbox>
                        </#if>
                        </el-checkbox-group>
                    <#elseif field.formControlType == 'number'>
                        <el-input-number v-model="searchCondition.${field.fieldJavaName}"  <#if field.formControlConfig.min??>:min="${field.formControlConfig.min}"</#if> <#if field.formControlConfig.max??>:max="${field.formControlConfig.max}"</#if> <#if field.formControlConfig.step??>:step="${field.formControlConfig.step}"</#if> <#if !field.formControlConfig.numberControls?? || field.formControlConfig.numberControls==0>:controls="false"</#if> ></el-input-number>
                    <#else>
                        <el-input v-model="searchCondition.${field.fieldJavaName}" placeholder=""></el-input>
                    </#if>
                    </el-form-item>
                </#list>
                <#if (conditionFields?size > 3)>
                    <el-form-item>
                        <el-button type="primary" link @click="moreConditionFlag = true" v-if="!moreConditionFlag">更多条件</el-button>
                        <el-button type="primary" link @click="moreConditionFlag = false" v-if="moreConditionFlag">收起条件</el-button>
                    </el-form-item>
                </#if>
            </#if>
                    <el-form-item>
                        <el-button type="primary" @click="list_search"><i class="fa fa-search" aria-hidden="true"></i>&nbsp;查询</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </el-col>
    </el-row>


    <#if model.extInfo?? && model.extInfo.buttonBarConfig?? && model.extInfo.buttonBarConfig.buttonList?? && (model.extInfo.buttonBarConfig.buttonList?size>0)>
    <!-- 按钮区 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
            <#list model.extInfo.buttonBarConfig.buttonList as btn>
                <el-button type="${btn.type!}" <#if btn.category??>${btn.category!}</#if>
                        <#if btn.size??>size="${btn.size}"</#if>
                        <#if btn.clickFunctionName?? && (btn.clickFunctionName?length>0)>@click="${btn.clickFunctionName}"</#if>
                        <#if btn.showRule?? && (btn.showRule?length>0)>v-if="${btn.showRule}"</#if>
                ><#if btn.icon?? && (btn.icon?length>0)>${btn.icon}&nbsp;</#if>${btn.name}</el-button>
            </#list>
            </div>
        </el-col>
    </el-row>
    </#if>
<#--    <el-row :gutter="15">-->
<#--        <el-col :span="24">-->
<#--            <div class="grid-content">-->
<#--                <el-button type="primary" @click="list_add" plain>新增</el-button>-->
<#--                <el-button type="danger" @click="list_delete_batch" plain>批量删除</el-button>-->
<#--                <el-button type="warning" onclick="window.location.reload()" plain>刷新</el-button>-->
<#--            </div>-->
<#--        </el-col>-->
<#--    </el-row>-->

    <!-- 数据表格 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
                <#--首列类型-->
                <#assign firstColumnType = (model.extInfo.tableFirstColumnType?? && model.extInfo.tableFirstColumnType?length>0)?string(model.extInfo.tableFirstColumnType,'none')  />
                <jo-el-table :url="tableDataUrl" :ref="joTableRef" :search-param="searchCondition" first-column="${firstColumnType!}" <#if model.extInfo.pageSize??>:page-size="${model.extInfo.pageSize}"</#if> >
                    <template #default="scope">
                        <el-table :ref="tableRef" :data="scope.data" header-cell-class-name="jo-el-table-header" @sort-change="list_table_sort">
                        <#if firstColumnType == 'radio'>
                            <el-table-column type="radio" width="50" fixed="left" header-align="center" align="center">
                                <template #default="scope2">
                                    <el-radio v-model="scope.radio.value" :label="scope2.$index"><span></span></el-radio>
                                </template>
                            </el-table-column>
                        <#elseif firstColumnType == 'checkbox'>
                            <el-table-column type="selection" prop="selection" width="50" fixed="left" label="#" header-align="center" align="center"></el-table-column>
                        <#elseif firstColumnType == 'index'>
                            <el-table-column type="index" width="50" fixed="left" label="#" header-align="center" align="center"></el-table-column>
                        <#else>
                        </#if>
                    <#list listFields as field>
                        <#--过滤掉不在列表展示的-->
                        <#if field.listColumnShow == 1>
                            <el-table-column prop="${field.fieldJavaName}" min-width="${field.listColumnWidth!}" header-align="${field.listHeaderAlign!}" align="${field.listValueAlign!}" <#if field.listColumnFixed?? && field.listColumnFixed != 'no'>fixed="${field.listColumnFixed!}"</#if> <#if field.listColumnSort?? && field.listColumnSort == 1>sortable="custom"</#if> >
                                <template #header="scope"><span title="${field.listHeaderTips!}">${field.listHeaderTitle!}</span></template>
                                <#if field.listValueFormat != 'text'>
                                <template #default="scope">
                                    <#if field.listValueFormat == 'html'>
                                        <div v-html="scope.row.${field.fieldJavaName}"></div>
                                    <#elseif field.listValueFormat == 'tag'>
                                        <el-tag type="primary" effect="plain">{{ scope.row.${field.fieldJavaName} }}</el-tag>
                                    <#elseif field.listValueFormat == 'link'>
                                        <el-link type="primary" :href="scope.row.${field.fieldJavaName}" target="_blank">链接</el-link>
                                    <#elseif field.listValueFormat == 'image'>
                                        <el-image :src="scope.row.${field.fieldJavaName}" style="width: 100px; height: 100px"></el-image>
                                    <#elseif field.listValueFormat == 'button'>
                                        <el-button type="primary">{{ scope.row.${field.fieldJavaName} }}</el-button>
                                    <#elseif field.listValueFormat == 'formatter'>
                                        {{ scope.row.${field.fieldJavaName} }}
                                    <#else>
                                        {{ scope.row.${field.fieldJavaName} }}
                                    </#if>
                                </template>
                                </#if>
                            </el-table-column>
                        </#if>
                    </#list>
                        <#--操作按钮列-->
                        <#if model.extInfo?? && model.extInfo.tableRowButtonConfig?? && model.extInfo.tableRowButtonConfig.buttonList?? && (model.extInfo.tableRowButtonConfig.buttonList?size>0)>
                            <#--表格行操作列宽度计算-->
                            <#assign operWidth = model.extInfo.tableRowButtonConfig.buttonBarWidth />
                            <el-table-column label="操作" width="${operWidth}" fixed="right">
                                <template #default="scope">
                                <#list model.extInfo.tableRowButtonConfig.buttonList as btn>
                                <#if (btn_index > 0) >
                                    <el-divider direction="vertical"></el-divider>
                                </#if>
                                    <el-button type="${btn.type!}" <#if btn.category??>${btn.category!}</#if>
                                            <#if btn.size??>size="${btn.size}"</#if>
                                            <#if btn.clickFunctionName?? && (btn.clickFunctionName?length>0)>@click="${btn.clickFunctionName}"</#if>
                                            <#if btn.showRule?? && (btn.showRule?length>0)>v-if="${btn.showRule}"</#if>
                                    ><#if btn.icon?? && (btn.icon?length>0)>${btn.icon}&nbsp;</#if>${btn.name}</el-button>
                                </#list>
                                </template>
                            </el-table-column>
                        </#if>
<#--                            <#if model.extInfo?? && model.extInfo.tableRowOperateButtonList?? && (model.extInfo.tableRowOperateButtonList?size > 0)>-->
<#--                                <el-table-column label="操作" width="${model.extInfo.tableRowOperateButtonList?size * 70}" fixed="right">-->
<#--                                    <template #default="scope">-->
<#--                                <#list model.extInfo.tableRowOperateButtonList as operate>-->
<#--                                    <#if (operate_index > 0) >-->
<#--                                        <el-divider direction="vertical"></el-divider>-->
<#--                                    </#if>-->
<#--                                    <#if operate == 'tag_view_tr_edit' >-->
<#--                                        <el-button type="primary" link @click="list_edit(scope.row)">详情</el-button>-->
<#--                                    <#elseif operate == 'tag_view_tr_del'>-->
<#--                                        <el-button type="danger" link @click="list_delete(scope.row)">删除</el-button>-->
<#--                                    </#if>-->
<#--                                </#list>-->
<#--                                    </template>-->
<#--                                </el-table-column>-->
<#--                            </#if>-->
                        </el-table>
                    </template>
                </jo-el-table>
            </div>
        </el-col>
    </el-row>

    <!-- 表单 -->
    <el-dialog v-model="formShow" :title="formTitle" :width="formWidth">
        <el-form :ref="formRef" :model="formData" label-position="right" :rules="checkRules" label-width="100px">
            <el-row :gutter="15">
        <#list formFields as field>
        <#--新增时隐藏-->
            <#assign addHide = field.formColumnShowConfig.showType?? && field.formColumnShowConfig.showType == 2 />
        <#--编辑时隐藏-->
            <#assign editHide = field.formColumnShowConfig.showType?? && field.formColumnShowConfig.showType == 3 />
        <#--新增时禁用-->
            <#assign addDisable = field.formColumnShowConfig.disableType?? && (field.formColumnShowConfig.disableType == 2 || field.formColumnShowConfig.disableType == 1) />
        <#--编辑时禁用-->
            <#assign editDisable = field.formColumnShowConfig.disableType?? && (field.formColumnShowConfig.disableType == 3 || field.formColumnShowConfig.disableType == 1) />
        <#--过滤掉不展示的-->
            <#if field.formColumnShow == 1 && (!field.formColumnShowConfig.showType?? || field.formColumnShowConfig.showType != 1)>
                <el-col :span="${field.formColumnGridWidth!}" <#if addHide>v-if="!addFlag"<#elseif editHide>v-if="!editFlag"</#if> >
                    <el-form-item label="${field.formControlTitle!}" prop="${field.fieldJavaName}">
                    <#if field.formControlType == 'date'>
                        <el-date-picker v-model="formData.${field.fieldJavaName}" type="date" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}"></el-date-picker>
                    <#elseif field.formControlType == 'time'>
                        <el-date-picker v-model="formData.${field.fieldJavaName}" type="datetime" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}"></el-date-picker>
                    <#elseif field.formControlType == 'switch'>
                        <#if field.fieldJavaType == 'String'>
                        <el-switch v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if>
                                   <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>active-value="${field.formControlConfig.yesValue}"<#else>active-value="1"</#if>
                                <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>inactive-value="${field.formControlConfig.noValue}"<#else>inactive-value="0"</#if>
                        ></el-switch>
                        <#elseif field.fieldJavaType == 'Boolean'>
                        <el-switch v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if>
                                   <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>:active-value="${field.formControlConfig.yesValue}"<#else>:active-value="true"</#if>
                                <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>:inactive-value="${field.formControlConfig.noValue}"<#else>:inactive-value="false"</#if>
                        ></el-switch>
                        <#else>
                        <el-switch v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if>
                                   <#if field.formControlConfig.yesValue?? && (field.formControlConfig.yesValue?length>0)>:active-value="${field.formControlConfig.yesValue}"<#else>:active-value="1"</#if>
                                <#if field.formControlConfig.noValue?? && (field.formControlConfig.noValue?length>0)>:inactive-value="${field.formControlConfig.noValue}"<#else>:inactive-value="0"</#if>
                        ></el-switch>
                        </#if>
                    <#elseif field.formControlType == 'select'>
                        <el-select v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}">
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-option v-for="option in ${field.fieldJavaName}Options" :value="option.${field.formControlDataSource.keyField!}" :label="option.${field.formControlDataSource.valueField!}"></el-option>
                        <#else>
                            <el-option value="" label="Option A"></el-option>
                        </#if>
                        </el-select>
                    <#elseif field.formControlType == 'radio'>
                        <el-radio-group v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> >
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-radio v-for="option in ${field.fieldJavaName}Options" :label="option.${field.formControlDataSource.keyField!}">{{option.${field.formControlDataSource.valueField!}}}</el-radio>
                        <#else>
                            <el-radio label="1">Option A</el-radio>
                        </#if>
                        </el-radio-group>
                    <#elseif field.formControlType == 'checkbox'>
                        <el-checkbox-group v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> >
                        <#if field.formControlDataSource?? && field.formControlDataSource.dataType != 'no'>
                            <el-checkbox v-for="option in ${field.fieldJavaName}Options" :label="option.${field.formControlDataSource.keyField!}">{{option.${field.formControlDataSource.valueField!}}}</el-checkbox>
                        <#else>
                            <el-checkbox label="1">Option A</el-checkbox>
                        </#if>
                        </el-checkbox-group>
                    <#elseif field.formControlType == 'textarea'>
                        <el-input type="textarea" v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}" <#if field.formControlConfig.rows??>:rows="${field.formControlConfig.rows}"</#if> <#if field.formControlConfig.autosize?? && field.formControlConfig.autosize=1>:autosize="true"</#if> ></el-input>
                    <#elseif field.formControlType == 'number'>
                        <el-input-number v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}" <#if field.formControlConfig.min??>:min="${field.formControlConfig.min}"</#if> <#if field.formControlConfig.max??>:max="${field.formControlConfig.max}"</#if> <#if field.formControlConfig.step??>:step="${field.formControlConfig.step}"</#if> <#if !field.formControlConfig.numberControls?? || field.formControlConfig.numberControls==0>:controls="false"</#if> ></el-input-number>
                    <#else>
                        <el-input v-model="formData.${field.fieldJavaName}" <#if addDisable>:disabled="addFlag"<#elseif editDisable>:disabled="editFlag"</#if> placeholder="${field.formControlPlaceholder!}"></el-input>
                    </#if>
                    </el-form-item>
                </el-col>
            </#if>
        </#list>
            </el-row>
        </el-form>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="close_form">取消</el-button>
                <el-button type="primary" @click="form_save">确认</el-button>
            </span>
        </template>
    </el-dialog>

<#list model.fieldList as field>
    <#if field.formControlDataSource??>
        <#if field.formControlDataSource.dataType == 'static'>
        <#elseif field.formControlDataSource.dataType == 'url'>
    <!-- ${field.formControlTitle}(${field.fieldJavaName})枚举项加载 -->
    <jo-el-data url="${field.formControlDataSource.dataUrl!}" bind-root-name="${field.fieldJavaName}Options"></jo-el-data>
        <#elseif field.formControlDataSource.dataType == 'dict'>
            <#--TODO 字段类型-->
        </#if>
    </#if>
</#list>

</div>


<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--layer-->
<!--<script src="/static/plugin/layer/layer.js"></script>-->
<!--vue-->
<script src="/static/plugin/vue/v3/vue.global.js"></script>
<script src="/static/plugin/element-ui/element-ui.js"></script>
<script src="/static/plugin/element-ui/locale/zh-cn.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-adapt-element-plus.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script src="/static/plugin/jo/jo-page-element-plus.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<script src="/static/js/common_biz.js"></script>
<#list model.extInfo.jsLinkList as js>
<#if js.url?? && (js.url?length>0)>
<script src="${js.url}"></script>
</#if>
</#list>
<#--  自定义事件定义,单独放在这里,避免配置错误整坏页面  -->
<script type="text/javascript">
    // 代码生成按钮事件定义
    window.TEMP_BTN_FUNCTION = {
        methods: {
            // 自定义按钮栏事件 start
<#if model.extInfo.buttonBarConfig?? && model.extInfo.buttonBarConfig.buttonList?? && (model.extInfo.buttonBarConfig.buttonList?size>0)>
    <#list model.extInfo.buttonBarConfig.buttonList as btn>
        <#if btn.clickFunctionName?? && (btn.clickFunctionName?length>0) && btn.clickScript?? && (btn.clickScript?length>0)>
            ${btn.clickScript},
        </#if>
    </#list>
</#if>
            // 自定义按钮栏事件 end

            // 自定义表格行按钮事件 start
<#if model.extInfo.tableRowButtonConfig?? && model.extInfo.tableRowButtonConfig.buttonList?? && (model.extInfo.tableRowButtonConfig.buttonList?size>0)>
    <#list model.extInfo.tableRowButtonConfig.buttonList as btn>
        <#if btn.clickFunctionName?? && (btn.clickFunctionName?length>0) && btn.clickScript?? && (btn.clickScript?length>0)>
            ${btn.clickScript},
        </#if>
    </#list>
</#if>
            // 自定义表格行按钮事件 end
        }
    };
</script>
<script type="text/javascript">
    // vue参数, 留着给全局js定制用, 如果有需要定制vue参数, 则覆盖TEMP_VUE_PARAM
    window.TEMP_VUE_PARAM = {};

<#if model.globalJs??>
    ${model.globalJs}
</#if>
</script>
<script type="text/javascript">
    // vue应用构造
    const app = Vue.createApp(joEl.buildVueAppParam(window.TEMP_VUE_PARAM || {}, {
        data: function () {
            return {
                // 查询参数
                searchCondition: {},
                // 表格数据url
                tableDataUrl: '${tableDataUrl}',
                // 表单详情查询url
                formQueryUrl: '${formQueryUrl}',
                // 新增url
                formInsertUrl: '${formInsertUrl}',
                // 修改url
                formUpdateUrl: '${formUpdateUrl}',
                // 删除url
                deleteUrl: '${deleteUrl}',
                // 校验规则
                checkRules: {
                    <#list formFields as field>
                        <#if field.formColumnShow == 1 && field.formControlCheckRule?? && field.formControlCheckRule.checkRuleList??
                            && (field.formControlCheckRule.checkRuleList?size > 0)>
                    ${field.fieldJavaName}: [
                            <#list field.formControlCheckRule.checkRuleList as rule>
                                <#if rule.checkType == 'ErrEmpty'>
                        joEl.rules.required('${rule.errorTips}', 'blur'),
                                <#elseif rule.checkType == 'ErrLength'>
                        joEl.rules.length('${rule.errorTips}', 'blur', ${rule.max}),
                                <#elseif rule.checkType == 'ErrNumber'>
                        joEl.rules.notNaN('${rule.errorTips}', 'blur'),
                                <#elseif rule.checkType == 'ErrMail'>
                        joEl.rules.mail('${rule.errorTips}', 'blur'),
                                <#elseif rule.checkType == 'ErrPhone'>
                        joEl.rules.phone('${rule.errorTips}', 'blur'),
                                <#elseif rule.checkType == 'ErrReg'>
                        joEl.rules.reg('${rule.errorTips}', 'blur', '${rule.checkReg}'),
                                </#if>
                            </#list>
                    ],
                        </#if>
                    </#list>
                },
                <#list model.fieldList as field>
                    <#if field.formControlDataSource?? && field.formControlDataSource.dataType??>
                        <#if field.formControlDataSource.dataType == 'static'
                            && field.formControlDataSource.optionItemList??
                            && (field.formControlDataSource.optionItemList?size > 0)>
                // 数据选项: ${field.listHeaderTitle!}
                ${field.fieldJavaName}Options: [
                           <#list field.formControlDataSource.optionItemList as option>
                    {key: <#if !field.numberFlag>'</#if>${option.key!}<#if !field.numberFlag>'</#if>, value: '${option.value!}'},
                           </#list>
                ],
                        <#elseif field.formControlDataSource.dataType == 'url'>
                // 数据选项: ${field.listHeaderTitle!}
                ${field.fieldJavaName}Options: [],
                        <#elseif field.formControlDataSource.dataType == 'dict'>
                // 数据选项: ${field.listHeaderTitle!}
                ${field.fieldJavaName}Options: [],
                        </#if>
                    </#if>
                </#list>

            }
        }
        , computed: {}
        , methods: {
            // 新增表单数据初始化前的处理
            handle_form_init_data_add(data) {
            },
            // 编辑表单数据初始化前的处理
            handle_form_init_data_edit(data) {
            },

        }
        , mounted() {

        }
        , setup() {

        }
    }, window.TEMP_BTN_FUNCTION || {}, joEl.VUE_COMMON_VIEW, joEl.VUE_COMMON));
    app.use(ElementPlus, {locale: ElementPlusLocaleZhCn});
    app.use(joEl);

    var appVM = app.mount("#app");
</script>

</body>
</html>
